<template>
<view>
	<uni-list>
		<uni-list-item @click="linkClick('姓名')"  title="姓名" :rightText="userInfo.userName" link />
		<uni-list-item @click="linkClick('手机号')"  title="手机号" :rightText="userInfo.phone" link />
		<uni-list-item @click="linkClick('密码修改')"  title="密码修改" link />
	</uni-list>
	<view class="button-com">
		 <button class="btn"  type="primary" @click="loginOut">退出登录</button>
	</view>
</view>
</template>

<script>
export default{
	data() {
		return {
			userInfo: {
				userName:'小帅',
				phone:'18122010592',
			}
		}
	},
	methods:{
		linkClick(label){
			switch(label){
					case '姓名':
					uni.navigateTo({
					    url: '/pages/my/userSetting/userNameEdit'
					});
					break	
					case '手机号':
					uni.navigateTo({
					    url: '/pages/my/userSetting/phoneEdit'
					});
					break	
					case '密码修改':
					uni.navigateTo({
					    url: '/pages/my/userSetting/passwordEdit'
					});
					break
			}
		},
		loginOut(){
			console.log('loginout')
		}
	}
}
	
</script>

<style lang="scss" scoped>
	.button-com {
		text-align: center;
		margin-top: 10rpx;
		.btn{
			width: 80%;
		}
	}
</style>

